﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace project_phoenix.source
{
    class LevelManager
    {
        ContentManager contentManager;

        List<Level> levels = new List<Level>();

        private int currentLevelIndex = 0;
        private string currentLevelString = "null";


        public void LoadContent(ContentManager content)
        {
            contentManager = content;
        }

        public void LoadLevel(string levelName)
        {
        }

        public void LoadTestLevel()
        {
            Level testlvl = new Level();
            testlvl.LoadTestLevel(contentManager);
            levels.Add(testlvl);
        }


        public void DrawLevel(GameTime gameTime)
        {
            levels[currentLevelIndex].Draw();
        }

        public void DrawLevelForeground(GameTime gameTime)
        {
            levels[currentLevelIndex].DrawForeground();
        }

        public void UpdateLevel(List<PlayableEntity> players, GameTime gameTime)
        {
            if (players.Count == 1)
            {
                // Update for single player
                levels[currentLevelIndex].UpdateSinglePlayer(players[0]);
            }
        }
    }
}
